@vs display_vs
uniform vs_params {
    mat4 mvp;
};

layout(location=0) in vec2 v_pos;
layout(location=1) in vec2 v_uv;

out vec2 texcoord;

void main() {
    texcoord = v_uv;
    gl_Position = mvp * vec4(v_pos.xy, 0.0, 1.0);
}
@end

@fs display_fs
uniform texture2D uTexture;
uniform sampler uTextureS;
uniform screen_size {
    int uScreenWidth;
    int uScreenHeight;
};

in vec2 texcoord;
out vec4 FragColor;

void main() {
    float pow = sin(texcoord.x * 2.0 * 3.14159265 * uScreenWidth);
    float col_r = texture(sampler2D(uTexture, uTextureS), texcoord + vec2(0.8 / uScreenWidth, 0.0)).r;
    float col_g = texture(sampler2D(uTexture, uTextureS), texcoord - vec2(0.0 / uScreenWidth, 0.0)).g;
    float col_b = texture(sampler2D(uTexture, uTextureS), texcoord - vec2(0.8 / uScreenWidth, 0.0)).b;

    FragColor = vec4(
        vec3(0.02, 0.02, 0.03) + 1.4 * (vec3(col_r, col_g, col_b) * 0.3 + texture(sampler2D(uTexture, uTextureS), texcoord).rgb * 0.6) * max(0.6, pow * 0.2 + 0.8),
        1.0
    );
}
@end

@program display display_vs display_fs